package com.jiangkang.example.exception;

public class BaseException extends RuntimeException {
	private static final long serialVersionUID = 1L;
	protected String code;
	protected Object[] messageArgs;
	protected String defaultFriendlyMessage;
	protected Throwable cause;

	public BaseException(String code, Throwable cause,  String defaultFriendlyMessage,Object[] messageArgs) {
		super(cause);
		this.code = code;
		this.defaultFriendlyMessage = defaultFriendlyMessage;
		this.messageArgs = messageArgs;
	}

	public String getCode() {
		return code;
	}

	public Object[] getMessageArgs() {
		return messageArgs;
	}

	public String getDefaultFriendlyMessage() {
		return defaultFriendlyMessage;
	}

	public Throwable getCause() {
		return cause;
	}
}
